﻿<!--
// ****************************************************************************
// <author>mishkin Ivan</author>
// <email>Mishkin_Ivan@mail.ru</email>
// <date>28.01.2015</date>
// <project>ItemsFilter</project>
// <license> GNU General Public License version 3 (GPLv3) </license>
// ****************************************************************************
-->
<ControlTemplate xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                 xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                 xmlns:vm="clr-namespace:Northwind.NET.Sample.ViewModel"
                 xmlns:vw="clr-namespace:Northwind.NET.Sample.View"
                 TargetType="vw:CustomersTreeFilterView"
                 mc:Ignorable="d">
    <!--  x:Class="Northwind.NET.Sample.View.CustomersTreeFilterViewTemplate"  -->
    <Border Style="{DynamicResource borderStyle}">
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="2" />
            </Grid.RowDefinitions>
            <TextBlock Margin="6,2,0,0"
                       Style="{DynamicResource FilterNameStyle}"
                       Text="Quick filter:" />
            <Button Grid.Column="1"
                    Margin="5"
                    HorizontalAlignment="Right"
                    Style="{DynamicResource FilterClearButtonStyle}" />
            <TextBlock Grid.Row="1"
                       Margin="11,3,5,3"
                       VerticalAlignment="Center"
                       Text="County:" />
            <TextBox Grid.Row="1"
                     Grid.Column="1"
                     Margin="3,0"
                     VerticalAlignment="Center"
                     Text="{Binding CountryCompareTo,
                                    UpdateSourceTrigger=PropertyChanged}" />
            <TextBlock Grid.Row="2"
                       Margin="22,3,5,3"
                       VerticalAlignment="Center"
                       Text="City:" />
            <TextBox Grid.Row="2"
                     Grid.Column="1"
                     Margin="3,0"
                     VerticalAlignment="Center"
                     Text="{Binding CityCompareTo,
                                    UpdateSourceTrigger=PropertyChanged}" />
            <TextBlock Grid.Row="3"
                       Margin="35,3,5,3"
                       VerticalAlignment="Center"
                       Text="Name:" />
            <TextBox Grid.Row="3"
                     Grid.Column="1"
                     Margin="3,0"
                     VerticalAlignment="Center"
                     Text="{Binding NameCompareTo,
                                    UpdateSourceTrigger=PropertyChanged}" />
            <TextBlock Grid.Row="4"
                       Margin="35,3,5,3"
                       VerticalAlignment="Center"
                       Text="Contact:" />
            <TextBox Grid.Row="4"
                     Grid.Column="1"
                     Margin="3,0"
                     VerticalAlignment="Center"
                     Text="{Binding ContactCompareTo,
                                    UpdateSourceTrigger=PropertyChanged}" />
        </Grid>

    </Border>
</ControlTemplate>
